package com.example.busshop.entity;

import com.example.busshop.common.entity.LogicEntity;

import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.Data;
import lombok.Getter;
import lombok.Setter;

import javax.persistence.*;

@Entity
@Setter
@Getter
@Table(name = "shopItem")
public class ShopItem extends LogicEntity {
    @Column
    private String name;
    @Column
    private double price;
    @OneToOne(fetch = FetchType.LAZY)
    @JsonIgnore
    private Item item;
    @Column//上架状态
    private Integer status=0;
    @ManyToOne
    private Shop shop;
    @Column
    private int quantity;

}
